﻿<UserControl x:Class="MyTime.Controls.AdvTextBox" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:control="clr-namespace:MyTime.Controls"
             mc:Ignorable="d"  MinHeight="25" MinWidth="200"           
             DataContext="{Binding RelativeSource={RelativeSource Self}}"
             d:DesignHeight="25" d:DesignWidth="200">
    <Canvas Name="txtCanvas" VerticalAlignment="Top" >
        <TextBox MinHeight="25" MinWidth="200" VerticalAlignment="Top" HorizontalAlignment="Left" Name="txtTextBox" KeyDown="txtTextBox_KeyDown" PreviewKeyDown="txtTextBox_PreviewKeyDown" TextWrapping="Wrap">
        </TextBox>
        <ListBox Height="100" HorizontalAlignment="Left" Name="listBox1" SelectionMode="Single" IsTabStop="False"
                 VerticalAlignment="Top" Width="{Binding ActualWidth, ElementName=txtCanvas}" 
                 Canvas.Left="2" Canvas.Top="31" />

    </Canvas>
</UserControl>
